from get_free_nodes.get_pbs_free_nodes import get_pbs_free_nodes
from get_free_nodes.get_slurm_free_nodes import get_slurm_free_nodes

def get_free_nodes_injs(myconfig):
    job_scheduler = myconfig["subinfo"]["job_scheduler"]
    if job_scheduler == "pbs":
        get_pbs_free_nodes(myconfig)
    elif job_scheduler == "slurm":
        get_slurm_free_nodes(myconfig)
    else:
        print("Job scheduler type is not supporsed! Now is {0}.".format(job_scheduler))
        exit(0)